
#include "mainwindow.h"
#include "./components/folderpermissionlabel.h"
#include <QDebug>
#include <QVBoxLayout>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    // 创建主容器
    QWidget *centralWidget = new QWidget;
    QVBoxLayout *mainLayout = new QVBoxLayout(centralWidget);

    /* 3. 创建权限标签组件 */
    FolderPermissionLabel* folderPermLabel = new FolderPermissionLabel;

    // 4. 设置初始权限状态
//    folderPermLabel->setReadPermission(FolderPermissionLabel::Allow);
//    folderPermLabel->setWritePermission(FolderPermissionLabel::NotSet);

    // 5. 添加到布局
    mainLayout->addWidget(folderPermLabel);

    // 6. 连接信号槽
//    connect(folderPermLabel, &FolderPermissionLabel::permissionChanged,
//            this, &MainWindow::onPermissionChanged);

    // 设置中心部件
    setCentralWidget(centralWidget);


}

MainWindow::~MainWindow()
{

}

